//
//  XMDiscountsModel.m
//  XunMi
//
//  Created by MacBook on 2024/4/16.
//  Copyright © 2024 TieZhu. All rights reserved.
//

#import "XMDiscountsModel.h"

@implementation XMDiscountsModel

+ (NSDictionary *)mj_replacedKeyFromPropertyName {
    return @{
        @"xmModule": @"module",
    };
}

- (NSString *)type {
    switch (self.xmModule) {
        case XMDiscountsChat:
            return @"聊天卡";
            break;
        case XMDiscountsAudio:
            return @"语音卡";
            break;
        case XMDiscountsVideo:
            return @"视频卡";
            break;
        case XMDiscountsRecharge:
            return @"充值券";
            break;
        case XMDiscountsWithdraw:
            return @"提现卡";
            break;
        default:
            break;
    }
}

- (NSString *)typeImg1 {
    switch (self.xmModule) {
        case XMDiscountsChat:
            return @"card_green1";
            break;
        case XMDiscountsAudio:
            return @"card_or1";
            break;
        case XMDiscountsVideo:
            return @"card_or1";
            break;
        case XMDiscountsRecharge:
            return @"card_red1";
            break;
        case XMDiscountsWithdraw:
            return @"card_blue1";
            break;
        default:
            break;
    }
}

- (NSString *)typeImg2 {
    switch (self.xmModule) {
        case XMDiscountsChat:
            return @"card_green2";
            break;
        case XMDiscountsAudio:
            return @"card_or2";
            break;
        case XMDiscountsVideo:
            return @"card_or2";
            break;
        case XMDiscountsRecharge:
            return @"card_red2";
            break;
        case XMDiscountsWithdraw:
            return @"card_blue2";
            break;
        default:
            break;
    }
}

- (NSString *)leftImg {
    switch (self.xmModule) {
        case XMDiscountsChat:
            return @"card_l_green";
            break;
        case XMDiscountsAudio:
            return @"card_l_or";
            break;
        case XMDiscountsVideo:
            return @"card_l_or";
            break;
        case XMDiscountsRecharge:
            return @"card_l_red";
            break;
        case XMDiscountsWithdraw:
            return @"card_l_blue";
            break;
        default:
            break;
    }
}

- (NSString *)unitStr {
    switch (self.xmModule) {
        case XMDiscountsChat:
        case XMDiscountsWithdraw:
        case XMDiscountsAudio:
        case XMDiscountsVideo:
            return @"张";
            break;
            
        case XMDiscountsRecharge:
            return @"元";
            break;
        default:
            break;
    }
}


- (UIColor *)xmColor {
    switch (self.xmModule) {
        case XMDiscountsChat: {
            return kHEX(@"#21B794");
        } break;
            
        case XMDiscountsAudio: {
            return kHEX(@"#FE9040");
        } break;
        case XMDiscountsVideo: {
            return kHEX(@"#FE9040");
        } break;
        case XMDiscountsRecharge: {
            return kHEX(@"#FF4258");

        } break;
        case XMDiscountsWithdraw: {
            return kHEX(@"#49A7FF");
        } break;
        default:
            break;
    }
}

@end


